<%--
  Created by IntelliJ IDEA.
  User: Mklaus
  Date: 15/7/25
  Time: 下午11:47
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<script type="text/javascript" src="/js/jquery-2.1.1.min.js"></script>
<html>
<head>
    <title>ajax</title>
</head>
<body>
<form>
  <input type="text" id="account">
  <input type="text" id="password">
  <input type="button" value="send" onclick="testjson()">
</form>
</body>

<script type="text/javascript" >
  function testjson() {

    var account  = document.getElementById("account").value;
    var password = document.getElementById("password").value;

    $.ajax({
      url:"/test/getJson.do",
      type:"post",
      dataType:"text",
      data:{"adminOgnl.adminName":account,"adminOgnl.password":password},
      success:function(data) {
        alert(data);
      }
    });

    alert("out");
  }
</script>

</html>
